<template>
  <div class="flex items-center justify-center mt-[20px]">
    <div class="w-[570px] h-[52px]">
      <el-input
        v-model="input"
        style="width: 100%; height: 100%"
        placeholder="请输入商品信息"
        :prefix-icon="Search"
      />
    </div>
    <div class="ml-[10px] h-[52px] w-[120px]">
      <el-button
        type="primary"
        style="width: 100%; height: 100%"
        @click="handleSearch"
        >搜索</el-button
      >
    </div>
  </div>
</template>
<script setup>
import { ref, defineEmits } from "vue";
import { Search } from "@element-plus/icons-vue";

const input = ref("");

const emits = defineEmits(["onSearch"]);
function handleSearch() {
  emits("onSearch", input.value);
}
</script>
<style></style>
